package com.sky.service.UserService.impl;

import com.sky.mapper.admin.DishMapper;
import com.sky.mapper.user.UserSetmealMapper;
import com.sky.pojo.Setmeal;
import com.sky.service.UserService.SetmealService;
import com.sky.vo.DishItemVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service

public class SetmealServiceImpl  implements SetmealService {
    @Resource
   private UserSetmealMapper setmealMapper1;
    @Autowired
    private DishMapper dishMapper;
    @Override
    public List<Setmeal> list(Setmeal setmeal) {
        List<Setmeal> list = setmealMapper1.list(setmeal);
        return list;
    }

    @Override
    public List<DishItemVO> getDishItemById(Long id) {
        return setmealMapper1.getDishItemBySetmealId(id);
    }
}
